package dao.impl;

import dao.RoMessDao;
import pojo.RoMess;
import util.BaseDao;

/**
 * 角色关联接口的实现类
 * @author 叶军军
 */
public class RoMessDaoImpl implements RoMessDao {

    /**
     * 添加一个角色菜单关联
     */
    @Override
    public int inseRmass(RoMess roMess) {
        return BaseDao.cud("insert into romess values(sequence_romess.nextval,?,?)",roMess.getRoleId(),roMess.getMenuId());
    }

    /**
     * 根据角色id删除角色菜单关联
     */
    @Override
    public int deleRmass(int roleId) {
        return BaseDao.cud("delete from romess where role_id=?",roleId);
    }
}
